<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class Navigation extends Model
{
    const TABLE = 'navigation';
    //
    public function getNavigationList($parent_id)
    {
        $list = DB::table(self::TABLE)->select('id', 'url', 'name')->where([['parent_id', '=', $parent_id], ['is_use', '=', 'Y']])->orderBy('order')->get();
        return $list;
    }
}
